<?php

$config = [
    'components' => [
        'db' => [
            'class' => "yii\db\Connection",
            'charset' => "utf8mb4",
//            'dsn' => "mysql:host=127.0.0.1;port=3306;dbname=sdjtest",
//            'username' => "",
//            'password' => "",
            'masterConfig' => [
                'username' => '',
                'password' => '',
            ],
            'masters' => [
                ['dsn' => 'mysql:host=127.0.0.1;port=3306;dbname=sdjtest'],
            ],
            'slaveConfig' => [
                'username' => '',
                'password' => '',
            ],
            'slaves' => [
                ['dsn' => 'mysql:host=127.0.0.1;port=3306;dbname=sdjtest'],
            ],
        ],
        'mailer' => [
            'class' => 'yii\swiftmailer\Mailer',
            'viewPath' => '@common/mail',
            // send all mails to a file by default. You have to set
            // 'useFileTransport' to false and configure a transport
            // for the mailer to send real emails.
            'useFileTransport' => true,
        ],
        'apiTool' => [
            'class' => 'common\components\ApiTool',
            'baseUri' => THIS_SERVER_BASE_URI."/api",
        ],
        'fenZhangTong' => [
            'class' => 'common\components\fenzhangtong\FenZhangTong',
            'version' => 2,
            'baseUri' => "https://xib03.test.xib.com.cn:8082/ifspesi/tfs/v2/api/XIB-B-SDJCS-77763",
            'sdjKey' => "@common/config/filedata/fenzhangtong_test/keys/xxx_pri.key",
            'xiaMengGuoJiYinHangCer' => "@common/config/filedata/fenzhangtong_test/keys/xib_pub2.pem",
            'platNo' => "XIB-B-SDJCS-77763", // 测试
            'mchNo' => "643503872760872960",
            'wxEntID' => "SDJ07",
        ],
        'fenZhangTongStandard' => [
            'class' => 'common\components\fenzhangtong\FenZhangTong',
            'version' => 1,
            'baseUri' => "https://ifsp.xib.com.cn/ifspesi/tfs/api",
            'sdjKey' => "@common/config/filedata/fenzhangtong/sdj-key.pem",
            'xiaMengGuoJiYinHangCer' => "@common/config/filedata/fenzhangtong/GuoJiYinHang.cer",
            'platNo' => "XIB-A-SDJ-02351",
            'mchNo' => "656790741716041728",
            'wxEntID' => "SDJ07",
        ],
        'zhiLing' => [
            'class' => 'common\components\zhiling\ZhiLing',
            'baseUri' => 'https://api.ziocn.com',
            'appKey' => ' y', // 生产
            'appSecret' => '',
            'sign' => '省到家',
        ],
        'sms' => [
            'class' => 'common\components\sms\Sms',
            'companys' => [
                'test' => [
                    'class' => '',
                ],
            ],
        ],
    ],
];

if (YII_ENV_DEV) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
        'class' => 'yii\debug\Module',
        'panels' => [
            'queue' => 'yii\queue\debug\Panel'
        ],
    ];
}

return $config;